﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta chaiset="uft-8">
    <title>video1--show me</title>
    <script src="js/jquery-1.9.1.min.js" type="text/javascript"></script>
    <script src="js/icamera/icamera.js" type="text/javascript"></script>
    <script type="text/javascript">
        console.log("11");
        window.addEventListener("DOMContentLoaded", function () {
            registVideo("video1", "canvas");

            // Trigger photo take
            var canvas = document.getElementById("canvas");
            var context = canvas.getContext("2d");
            var video1 = document.getElementById("video1");
            document.getElementById("snap").addEventListener("click", function () {
                $('#img_test').attr('src', canvas.toDataURL('image/jpeg', 50));
                context.drawImage(video1, 0, 0, 640, 480);
            });
        }, false);
    </script>
</head>
<body>
    <video id="video1" width="640" autoplay></video>
    <button id="snap" class="sexyButton">
        Snap Photo</button>
    <canvas id="canvas" width="640" height="480"></canvas>
    <canvas id="canvasSource" width="640" height="480"></canvas>
    <canvas id="canvasBlended" width="640" height="480"></canvas>
</body>
</html>
